package com.alibaba.yinan.app;

import com.alibaba.yinan.app.executor.TaskCreateAndDispatchCmdExe;
import com.alibaba.yinan.client.api.TaskFacade;
import com.alibaba.yinan.client.dto.CreateAndDispatchTaskCmd;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @ClassName TaskApplicationService
 * @Author mengke
 * @create 2025/8/4 02:45
 * @Description
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class TaskApplicationService implements TaskFacade {

    private final TaskCreateAndDispatchCmdExe cmdExecutor;

    @Override
    public void createAndDispatch(CreateAndDispatchTaskCmd cmd) {
        cmdExecutor.execute(cmd);
    }
}
